package br.usp.ime.dojo.client;

import java.util.ArrayList;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("DojoRoomService")
public interface DojoRoomService extends RemoteService  {
	List<String> getUserListFromRoom(String dojoRoomName);
	List<String> getPilotQueueFromRoom(String dojoRoomName);
	String getPilot(String string);
	String getCopilot(String string);
	void exitDojoRoom(String userName, String dojoRoomName);
	void join(DojoRoomDTO dojoRoom, UserDTO user) throws DojoException;
	ArrayList<DojoRoomDTO> getDojoRoomList() throws DojoException;
	void toggle(DojoRoomDTO dojoRoom, UserDTO user);
	void setRoomDescription(String newDescription, String roomName);
	String getRoomDescription(String roomName);
	boolean verifyIfIsStarted(String roomName);
	void updateCodeInServer(String codeText);
	String updateCodeInClient();
	void updateTestCodeInServer(String testCodeText);
	String updateResultCodeInClient();
	void updateResultCodeInServer(String resultCodeText);
	String updateTestCodeInClient();
	DojoRoomDTO createDojoRoom(String name, String description, String creator, List<String> selectedLanguages) throws DojoException;
	List<String> getAvailableLanguages();
	List<String> getSelectedLanguages(String roomName);
	List<String> getInitialLanguages(String roomName);
	void setSelectedLanguages(String name, String text);
	void startSession(String roomName) throws DojoException;
}
